// ============================================================================
//
// LCP-net framework by Pierre CHATEL chatelp@gmail.com
// Distributed under GPLv3
// Copyright (C) THALES Land & Joint Systems, 2008, 2009. All rights reserved
//
// ============================================================================

/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package com.thalesgroup.preferenceFramework.models.exceptions.impl;

import com.thalesgroup.preferenceFramework.models.LCPnet.LCPnetPackage;

import com.thalesgroup.preferenceFramework.models.LCPnet.fragments.FragmentsPackage;

import com.thalesgroup.preferenceFramework.models.LCPnet.fragments.impl.FragmentsPackageImpl;

import com.thalesgroup.preferenceFramework.models.LCPnet.impl.LCPnetPackageImpl;

import com.thalesgroup.preferenceFramework.models.ModelsPackage;

import com.thalesgroup.preferenceFramework.models.exceptions.ExceptionsFactory;
import com.thalesgroup.preferenceFramework.models.exceptions.ExceptionsPackage;
import com.thalesgroup.preferenceFramework.models.exceptions.PreferenceEvaluationException;
import com.thalesgroup.preferenceFramework.models.exceptions.PreferenceException;

import com.thalesgroup.preferenceFramework.models.impl.ModelsPackageImpl;

import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class ExceptionsPackageImpl extends EPackageImpl implements ExceptionsPackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EDataType preferenceExceptionEDataType = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EDataType preferenceEvaluationExceptionEDataType = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see com.thalesgroup.preferenceFramework.models.exceptions.ExceptionsPackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private ExceptionsPackageImpl() {
		super(eNS_URI, ExceptionsFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this
	 * model, and for any others upon which it depends.  Simple
	 * dependencies are satisfied by calling this method on all
	 * dependent packages before doing anything else.  This method drives
	 * initialization for interdependent packages directly, in parallel
	 * with this package, itself.
	 * <p>Of this package and its interdependencies, all packages which
	 * have not yet been registered by their URI values are first created
	 * and registered.  The packages are then initialized in two steps:
	 * meta-model objects for all of the packages are created before any
	 * are initialized, since one package's meta-model objects may refer to
	 * those of another.
	 * <p>Invocation of this method will not affect any packages that have
	 * already been initialized.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static ExceptionsPackage init() {
		if (isInited) return (ExceptionsPackage)EPackage.Registry.INSTANCE.getEPackage(ExceptionsPackage.eNS_URI);

		// Obtain or create and register package
		ExceptionsPackageImpl theExceptionsPackage = (ExceptionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ExceptionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ExceptionsPackageImpl());

		isInited = true;

		// Obtain or create and register interdependencies
		ModelsPackageImpl theModelsPackage = (ModelsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ModelsPackage.eNS_URI) instanceof ModelsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ModelsPackage.eNS_URI) : ModelsPackage.eINSTANCE);
		LCPnetPackageImpl theLCPnetPackage = (LCPnetPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LCPnetPackage.eNS_URI) instanceof LCPnetPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LCPnetPackage.eNS_URI) : LCPnetPackage.eINSTANCE);
		com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.impl.ExceptionsPackageImpl theExceptionsPackage_1 = (com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.impl.ExceptionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.ExceptionsPackage.eNS_URI) instanceof com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.impl.ExceptionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.ExceptionsPackage.eNS_URI) : com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.ExceptionsPackage.eINSTANCE);
		FragmentsPackageImpl theFragmentsPackage = (FragmentsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(FragmentsPackage.eNS_URI) instanceof FragmentsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(FragmentsPackage.eNS_URI) : FragmentsPackage.eINSTANCE);

		// Create package meta-data objects
		theExceptionsPackage.createPackageContents();
		theModelsPackage.createPackageContents();
		theLCPnetPackage.createPackageContents();
		theExceptionsPackage_1.createPackageContents();
		theFragmentsPackage.createPackageContents();

		// Initialize created meta-data
		theExceptionsPackage.initializePackageContents();
		theModelsPackage.initializePackageContents();
		theLCPnetPackage.initializePackageContents();
		theExceptionsPackage_1.initializePackageContents();
		theFragmentsPackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theExceptionsPackage.freeze();

		return theExceptionsPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EDataType getPreferenceException() {
		return preferenceExceptionEDataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EDataType getPreferenceEvaluationException() {
		return preferenceEvaluationExceptionEDataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ExceptionsFactory getExceptionsFactory() {
		return (ExceptionsFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create data types
		preferenceExceptionEDataType = createEDataType(PREFERENCE_EXCEPTION);
		preferenceEvaluationExceptionEDataType = createEDataType(PREFERENCE_EVALUATION_EXCEPTION);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Initialize data types
		initEDataType(preferenceExceptionEDataType, PreferenceException.class, "PreferenceException", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
		initEDataType(preferenceEvaluationExceptionEDataType, PreferenceEvaluationException.class, "PreferenceEvaluationException", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
	}

} //ExceptionsPackageImpl
